<center>
<?php
	$tablelettre = new Table_Vips();
	$lettre=$tablelettre->getPremiereLettreTousVip();
	foreach ($lettre as $ligne)
	{
		?><a href = <?php echo $this -> url(array('controller' => 'repertoire', 'action' => 'listervip', 'lettre' => $ligne -> lettre)); ?>><?php echo $ligne -> lettre; ?><a/><?php
		echo " ";
	}
?>
</center>
<table><tr>
<?php
		$tablePhotos = new Table_Photos();
		$nb_col = 0;
		foreach($this->listerrepertoire as $ligne)
		{
			echo "<td>";
			
            $photo = $tablePhotos->getPhotoPrincipale($ligne->VIP_NUMERO);
			
			if($photo!=null){?>
				<img height = "128px" src="/images/<?php echo "$photo->PHOTO_ADRESSE"; ?>"   /><br> <?php
			}
			else{ ?>
				<img height = "128px" src="/images/empty.png"/><br><?php
			} ?>
			<a href="<?php echo $this->url(array(
								'controller'=>'repertoire',
								'action'=>'detailsvip',
								'idVip'=>$ligne->VIP_NUMERO));?>"><?php echo $ligne->VIP_PRENOM." ". $ligne->VIP_NOM; ?>
			</a>
			
			<?php
			echo "</td>";
			$nb_col=$nb_col+1;
			if ($nb_col==9) {
				echo "</tr><tr>";
			}
		}

?>
</tr>
</table>